Skip to content

test(audio): expect the spec-normalized square level from web-audio-api 1.8.0 - #207

Merged
triniwiz merged 1 commit into
masterfrom
fix/audio-square-level
Nov 12, 2026
Merged

triniwiz merged 1 commit into
masterfrom
fix/audio-square-level

Conversation

@triniwiz

@triniwiz triniwiz commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Since today, the Linux and Windows x64 native builds fail one test, renders an oscillator through a gain offline. It fails the same way on every platform: rms 0.415166155667296. That breaks master CI and the 3.0.6 release.

Cargo.lock isn't committed, and web-audio-api 1.8.0 was released today. It's the only crate that differs from the last passing build. Its changelog includes:

Fix: The built-in square and sawtooth oscillators were 1.43 dB louder than the spec's normalized PeriodicWave

The square oscillator now uses the spec's normalized PeriodicWave, as Chrome's does. The band-limited square overshoots by about 1.179 (the Gibbs peak), so it is scaled until its peak is 1. At gain 0.5 the render now peaks at 0.424 with an RMS of 0.415, where the test expected 0.5.

Changes:

  • web-audio-api = "1.8.0", so no build can resolve the old, louder output.
  • The test expects 0.415 ± 0.01. The failure message now reports the value the test checks; before, it reported the RMS of every sample, including the 480 the check skips.

Locally, with the addon built against 1.8.0, the oscillator test passes. It renders offline, so the result doesn't depend on the platform.

…pi 1.8.0

web-audio-api 1.8.0 scales the built-in square and sawtooth to the spec's
normalized PeriodicWave (1.43 dB quieter), as Chrome does. Cargo.lock is not
committed, so CI picked it up and the offline oscillator test, which still
expected the old level, failed on Linux and Windows. Require 1.8.0 and expect
its level.
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9ff2b64a-b261-4ce2-b99c-05dd69230bb3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@triniwiz
triniwiz merged commit b838408 into master Nov 12, 2026
12 of 25 checks passed
@triniwiz
triniwiz deleted the fix/audio-square-level branch November 12, 2026 13:20
@triniwiz triniwiz changed the title test(audio): expect the spec-normalized square level from web-audio-api 1.8.0 fix(ci): audio test for web-audio-api 1.8.0; keep the Skia cache Nov 12, 2026
@triniwiz triniwiz changed the title fix(ci): audio test for web-audio-api 1.8.0; keep the Skia cache test(audio): expect the spec-normalized square level from web-audio-api 1.8.0 Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant